package com.xayy.health.core.enums;

import lombok.Getter;

/**
 * @author zhangxa
 */
@Getter
public enum MultiParameterEnum {
    //斜率异常检查
    SLOPEALGORITHM("1", "斜率异常检查"),
    //均值特征
    MEANFEATUREALGORITHM("2", "均值特征"),
    //k近邻
    KNEARESTNEIGHBORALGORITHM("3", "k近邻"),
    //双参数诊断
    TWOPARAMETERDIAGNOSISALGORITHM("4", "双参数诊断"),
    //门限判断算法
    THRESHOLDJUDGMENTALGORITHM("5", "门限判断算法");

    private final String code;

    private final String algorithmName;

    MultiParameterEnum(String code, String algorithmName) {
        this.code = code;
        this.algorithmName = algorithmName;
    }

    public static String valueof(String code) {
        for (MultiParameterEnum multiParameterEnum : values()) {
            if (multiParameterEnum.getCode() == code) {
                return multiParameterEnum.algorithmName;
            }
        }
        return "";
    }
}
